package com.leather.quan.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.leather.common.entity.QuanComment;
import com.leather.common.result.Result;
import com.leather.quan.vo.CommentAddVo;

public interface CommentService extends IService<QuanComment> {


    /**
     * 帖子删除了 则删除所有的评论
     * @param quanId
     * @return
     */
    void deleteAllComment(int quanId);


    /**
     *
     * @param id
     * @param userId
     * @return
     */
    Result deleteByUserId(int id,int userId);


    /**
     * 增加评论
     * @param commentAddVo
     * @return
     */
    Result addComment(CommentAddVo commentAddVo);


    /**
     * 获取帖子下的所有评论
     * @param quanId
     * @return
     */
    Result queryCommentByQuanId(int quanId);

}
